/*
 * World.cpp
 *
 *  Created on: 20 Dec 2011
 *      Author: mohab
 */

#include "World.h"
#include "Enums.h"

World::World()
{

}

void World::Init()
{
	machines = new Machine[13];
	for(int i = 0; i < 13; i++)
	{
		machines[i] = Machine();
		machines[i].number = i+1;
		machines[i].state = Enums::On;
		switch(i)
		{
		case 10:		machines[i].type = Enums::Testing; break;
		case 11:		machines[i].type = Enums::Recycling; break;
		case 12:		machines[i].type = Enums::Recycling; break;
		default:		machines[i].type = Enums::Unknown0; break;
		}
	}

	deliveryGate = DeliveryGate();
	/*pucks = Pucks();
	for(int i = 0; i < 20; i++)
		pucks.S0.push_front(0);*/
	pucks = new Puck[20];
	for(int i = 0; i < 20; i++)
	{
		pucks[i].location = LOC_LOADING_AREA;
		pucks[i].state = PCK_S0;
	}
}

void World::Update()
{

}
